//
//  ZLMainViewController.m
//  Smartourism
//
//  Created by Wu Zhiyong on 1/23/13.
//  Copyright (c) 2013 Rikee. All rights reserved.
//

#import "ZLMainViewController.h"
#import "ZLPreViewController.h"

@interface ZLMainViewController ()

@end

@implementation ZLMainViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.topBar.backgroundColor =[UIColor colorWithPatternImage:[UIImage imageNamed:@" top_bar.png"]];
    self.view.backgroundColor =[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg.png"]];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)nextBtn:(id)sender {
    UIButton *button =sender;
    ZLPreViewController *pvCtr =[[ZLPreViewController alloc]initWithNibName:@"ZLPreViewController" bundle:nil];
    pvCtr.x_currentCity =[[NSNumber numberWithInteger:button.tag]intValue];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"PUSHCONTROLLER" object:pvCtr];
    [pvCtr release];
}
- (void)dealloc {
    [_topBar release];
    [super dealloc];
}
- (void)viewDidUnload {
    [self setTopBar:nil];
    [super viewDidUnload];
}
@end
